package com.googlecode.kipler.container.dl.operational;

import com.googlecode.kipler.container.dl.ABox;
import com.googlecode.kipler.container.dl.Individual;
import com.googlecode.kipler.syntax.Role;
import com.googlecode.kipler.syntax.concept.Concept;


/**
 * 
 * @author İnanç Seylan
 *
 */
public class RelatedIndividualWithTypeFilterFactory {

	public static RelatedIndividualWithTypeFilter getFilter(FilterType type) {
		RelatedIndividualWithTypeFilter result = null;
		switch (type) {
		case TYPED_SUCCESSOR:
			result = new TypedSuccessorFilter();
			break;
		case TYPED_NEIGHBOR:
			result = new TypedNeighborFilter();
			break;
		case TYPED_SAFE_NEIGHBOR:
			result = new TypedSafeNeighborFilter();
			break;
		case TYPED_BLOCKABLE_PREDECESSOR:
			result = new TypedBlockablePredecessorFilter();
			break;
		case TYPED_NOMINAL_NEIGHBOR:
			result = new TypedNominalNeighborFilter();
			break;
		}
		return result;
	}

	public static RelatedIndividualWithTypeFilter getFilter(FilterType type,
			ABox abox, Individual individual, Role role, Concept concept) {
		RelatedIndividualWithTypeFilter result = getFilter(type);
		result.setABox(abox);
		result.setIndividual(individual);
		result.setRole(role);
		result.setConcept(concept);
		return result;
	}
}
